package cn.lizemin.builder.version0.entity;

/**
 * @author lzm
 * @version 1.0
 * @description: 公寓建造者
 * @date 2022/4/27 11:19
 */
public class ApartmentBuilder implements Builder {

    private Building apartment;

    public ApartmentBuilder() {
//        对成员变量进行初始化
        this.apartment = new Building();
    }

    @Override
    public void buildBasement() {
        apartment.buildBasement("公寓地基" + "\n");
        System.out.println("造公寓的地基");
    }

    @Override
    public void buildProof() {
        apartment.buildBasement("公寓屋顶" + "\n");
        System.out.println("造公寓的屋顶");
    }

    @Override
    public void buildWall() {
        apartment.buildBasement("公寓墙体" + "\n");
        System.out.println("造公寓的墙体");
    }

    @Override
    public Building getBuilding() {
        return this.apartment;
    }
}
